<%@ page isELIgnored="false" %>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib uri="http://www.shengruan.org/tags" prefix ="f"%> 
<%@ taglib prefix="shengruan" uri="http://www.shengruan.com/taglib"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Pragma" content="no-cache">
<link href="../style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<c:url value='/admin/assets/js/jquery/jquery.js'/>"></script>
<script type="text/javascript" language="javascript">
// <![CDATA[
$(document).ready(function() {
<c:if test="${not empty requestScope.message}">
$("#infoSpan").html("<img src='<c:url value='/admin/assets/images/flag.gif'/>'><font color='#C00000'><c:out value='${requestScope.message}' escapeXml='false'/></font>");
</c:if>

});
function productListReload(){
	window.location.reload();
}
var productListReloadInter = setInterval("productListReload()",1000*60*90);


// ]]>
</script>
</head>
<body class="main">
<table class="container" cellpadding="0" cellspacing="0">

<tr class="dark" valign="middle">
<td>
<form action="<c:url value='/admin/product/product-list.ac'/>" method="post" name="productListForm" id="productListForm" >
<input type="hidden" name="status" value="${requestScope.status}"/>
<table width="100%" border="0">
  <tr>
    <td>
    <input class="button" type="button" value="新增" onClick="document.location='/admin/product/product-init.ac'">
    会员：<input type="text" name="name" id="name" size="31" maxlength="31" value="${requestScope.name}">&nbsp;
    <input name="button" type="submit" class="button" id="button" value="查询" >
    </td>
    <td>
    
    </td>
  </tr>
  <c:if test="${not empty requestScope.message}">
<tr class="dark" valign="middle">
<td align="center"><span id="infoSpan" class="infoSpan">&nbsp;</span></td>
</tr>
</c:if>
</table>
</form>
</td>
</tr>
<tr>
<td colspan="2"><table class="list" align="center" cellspacing="1" cellpadding="0">
<tr class="heading">
<td width=4%>序号</td>
<td width=9%>商品分类</td>
<td>商品名称</td>
<td width=12%>创建时间</td>
<td width=7%>竞拍状态</td>
<td width=4% style="display:none">状态</td>
<td width=13%>&nbsp;</td>
</tr>
<c:set var="sort" value="0"/>
<c:forEach var="product" items="${requestScope.productList}">
<c:set var="sort" value="${sort+1}"/>
<c:set var="count" value="${(pager.currentPage-1)*pager.pageSize+sort}"/>
<tr <c:if test='${sort%2==0}'>class="odd"</c:if>>
  <td height="20">${count}</td>
  <td>${product.className}</td>
  <td height="20" style="text-align:left" title="${product.name}">${product.name}</td>
  <td height="20">${f:format(product.creationTime)}</td>
  <td height="20" style="display:none">
<c:choose>
 <c:when test="${product.auctionStatus==1}">即将开始</c:when>
 <c:when test="${product.auctionStatus==2}">竞拍中</c:when>
 <c:when test="${product.auctionStatus==3}">竞拍结束</c:when>
</c:choose></td>

  <td height="20">
<c:choose><c:when test="${product.isvalid == 0}">下架</c:when><c:otherwise>上架</c:otherwise></c:choose>



  </td>
  <td height="20" class="action">
  <a href="<c:url value='/admin/product/product-changeIsvalid.ac?id=${product.id}&status=${requestScope.status}'/>"><c:choose><c:when test="${product.isvalid == 0}"><img src="/admin/assets/images/ok.gif" title="上架" width="16" height="17" border="0" /></c:when><c:otherwise><img src="/admin/assets/images/no.png" title="下架" width="16" height="17" border="0" /></c:otherwise></c:choose></a>
  &nbsp;<a href="<c:url value='/admin/product/product-delete.ac?id=${product.id}&status=${requestScope.status}'/>" onClick="return confirm('确认删除吗？')"><img src="/admin/images/delete.gif" alt="删除" title="删除" border="0"></a>
  &nbsp;<a href="<c:url value='/admin/product/product-getById.ac?id=${product.id}&status=${requestScope.status}'/>"><img src="/admin/images/edit.gif" alt="编辑" title="编辑" border="0"></a>
  &nbsp;<a href="<c:url value='/admin/product/product-up.ac?id=${product.id}&status=${requestScope.status}'/>"><img src="/admin/images/up.gif" alt="向上" title="向上" border="0"></a>
  &nbsp;<a href="<c:url value='/admin/product/product-down.ac?id=${product.id}&status=${requestScope.status}'/>"><img src="/admin/images/down.gif" alt="向下" title="向下" border="0"></a>
  <c:if test="${product.auctionStatus > 1}">
  &nbsp;<a href="<c:url value='/admin/product/auction-history-list.ac?productId=${product.id}&status=${requestScope.status}'/>" style="display:none"><img src="/admin/images/view.gif" alt="竞拍记录" title="竞拍记录" border="0"></a>
  </c:if>
  </td>
</tr>
</c:forEach>
<tr ><td colspan="11" height="40"><div align="right"><shengruan:pager pager="${requestScope.pager}" url="/admin/product/product-list.ac" isSubmit="true" formName="productListForm"/></div></td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>

